package com.genexususa.eo.bing.data.wsSubclasses;

import com.genexususa.eo.bing.CampaignManagementServiceClasses.GeoPoint;
import org.w3c.dom.Element;

public class GxGeoPoint extends GeoPoint {
    public GxGeoPoint(Element element) {
        if (element.getElementsByTagName("LatitudeInMicroDegrees").getLength() > 0 &&
            element.getElementsByTagName("LatitudeInMicroDegrees").item(0).getChildNodes().getLength() > 0) {
            this.setLatitudeInMicroDegrees(Integer.valueOf(element.getElementsByTagName("LatitudeInMicroDegrees").item(0).getChildNodes().item(0).getNodeValue()));
        }
        if (element.getElementsByTagName("LongitudeInMicroDegrees").getLength() > 0 &&
            element.getElementsByTagName("LongitudeInMicroDegrees").item(0).getChildNodes().getLength() > 0) {
            this.setLongitudeInMicroDegrees(Integer.valueOf(element.getElementsByTagName("LongitudeInMicroDegrees").item(0).getChildNodes().item(0).getNodeValue()));
        }
    }
}
